package com.coffee.attachment;

import com.coffee.attachment.service.MochaExcelService;
import com.coffee.excel.MochaExcelSheet;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * @author: songkui
 * @since: 2023/4/20 15:34
 */
@Slf4j
@RestController
@RequestMapping("/coffee/excel")
@AllArgsConstructor
public class  MochaExcelFacade {
    private final MochaExcelService mochaExcelService;

    @GetMapping("/find/field")
    public MochaExcelSheet findFields(@RequestParam("excelCode") String excelCode, @RequestParam(name ="fields", required = false) String fields){
       return mochaExcelService.findExcelField(excelCode, fields);
    }


}
